package com.bey.bow.utils;

import org.apache.shiro.SecurityUtils;

import com.bey.bow.service.account.ShiroDbRealm.ShiroUser;

public class UserUtils {

	/**
	 * 取出Shiro中的当前用户Id.
	 */
	public static Long getCurrentUserId() {
		ShiroUser user = (ShiroUser) SecurityUtils.getSubject().getPrincipal();
		return user.id;
	}

}
